package com.practices2.fragment;

import com.practices2.R;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

//有2种方法你可以添加一个fragment到activity layout:
//1.在activity的layout文件中声明fragment
//2.撰写代码将fragment添加到一个已存在的ViewGroup.

public class Fragement1 extends Fragment {

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
		return inflater.inflate(R.layout.activity_main, container, false);
	}

}
